/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.ems.entity;

import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 购物车历史Entity
 * @author zad
 * @version 2018-01-25
 */
public class EmsCartHis extends DataEntity<EmsCartHis> {
	
	private static final long serialVersionUID = 1L;
	// private String courseId;		// 课程
	// private String studentId;		// 学员
	private EmsCourse course;			// 课程
	private EmsStudent student ;		// 学员
	private BigDecimal siteDiscount;		// 现场折扣
	private BigDecimal payMoney;		// 应付金额
	// private Date createTime;		// 创建时间
	// private String orderId;		// 所属订单
	private EmsOrder order;
	private EmsOrderRefund emsOrderRefund; // 所属退单
	
	private String status;		// 状态 1:已培训；0：未培训；2：退款申请中；3:已退款
	
	public EmsCartHis() {
		super();
	}

	public EmsCartHis(String id){
		super(id);
	}

	
	/*@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@NotNull(message="创建时间不能为空")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}*/
	
	public EmsCourse getCourse() {
		return course;
	}

	public void setCourse(EmsCourse course) {
		this.course = course;
	}

	public EmsStudent getStudent() {
		return student;
	}

	public void setStudent(EmsStudent student) {
		this.student = student;
	}

	public BigDecimal getSiteDiscount() {
		return siteDiscount;
	}

	public void setSiteDiscount(BigDecimal siteDiscount) {
		this.siteDiscount = siteDiscount;
	}

	@Length(min=1, max=2, message="是否启用长度必须介于 1 和 2 之间")
	public String getStatus() {
		return status;
	}

	public EmsOrder getOrder() {
		return order;
	}

	public void setOrder(EmsOrder order) {
		this.order = order;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public BigDecimal getPayMoney() {
		return payMoney;
	}

	public void setPayMoney(BigDecimal payMoney) {
		this.payMoney = payMoney;
	}

	public EmsOrderRefund getEmsOrderRefund() {
		return emsOrderRefund;
	}

	public void setEmsOrderRefund(EmsOrderRefund emsOrderRefund) {
		this.emsOrderRefund = emsOrderRefund;
	}
	
}